import request from "../utils/request";

export default{
    search(page,size,searchMap){
        return request({
            url:`/goods/findPageAndCount/${page}/${size}`,
            method:'post',
            data:searchMap
        })
    },
    add(goods){
        return request({
            url:`/goods/goods`,
            method:'post',
            data:goods
        })
    },
    getById(id){
        return request({
            url:`/goods/${id}`,
            method:'get'
        })
    },
    update(goods){
        return request({
            url:'/goods/goods',
            method:'post',
            data:goods
        })
    },
    deleteById(id){
        return request({
            url:`/goods/${id}`,
            method:'delete'
        })
    }
}